package com.srxz.personnelsystem.system.repository;

import com.srxz.personnelsystem.system.entity.LoginInfo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @作者：wgchao
 * @时间：19:21 2019/1/22 0022
 * @用途：
 **/
@Repository
public interface LoginInfoRepository extends JpaRepository<LoginInfo, String> {
    public LoginInfo findFirstByUserIdAndDeleteTimeIsNull(String userId);

    public LoginInfo findFirstByUnameAndDeleteTimeIsNull(String uname);

    public List<LoginInfo> findAllByUserIdAndDeleteTimeIsNullAndStatusIsTrue(String userId);

    public LoginInfo findFirstByUnameAndDeleteTimeIsNullAndStatusIsTrue(String uname);
}
